<template>
    <div>
        <TypeNav />
        <ListContainer />
        <Recommend />
        <Rank />
        <Like />
        <Floor v-for="(floor, index) in floorList" :key="index" :Myfloor="floor" />
        <Brand />
    </div>
</template>

<script>
import { mapState } from 'vuex';

import ListContainer from '@/pages/home/listcontainer/'
import Recommend from '@/pages/home/recommend'
import Rank from '@/pages/home/rank'
import Like from '@/pages/home/like'
import Floor from '@/pages/home/floor'
import Brand from '@/pages/home/brand'
export default {
    name: 'Home',
    components: { ListContainer, Recommend, Rank, Like, Floor, Brand },
    mounted() {
        this.$store.dispatch("getFloorList");
    },
    computed: {
        ...mapState({ //state是大仓库中的数据
            floorList: state => state.home.floorList
        })
    }
}
</script>

<style lang="less" scoped></style>